package com.ruoyi.reward.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.reward.mapper.OfferRewardMapper;
import com.ruoyi.reward.domain.OfferReward;
import com.ruoyi.reward.service.IOfferRewardService;

/**
 * rewardService业务层处理
 * 
 * @author YuYang
 * @date 2021-11-11
 */
@Service
public class OfferRewardServiceImpl implements IOfferRewardService 
{
    @Autowired
    private OfferRewardMapper offerRewardMapper;

    /**
     * 查询reward
     * 
     * @param rewardId reward主键
     * @return reward
     */
    @Override
    public OfferReward selectOfferRewardByRewardId(Long rewardId)
    {
        return offerRewardMapper.selectOfferRewardByRewardId(rewardId);
    }

    /**
     * 查询reward列表
     * 
     * @param offerReward reward
     * @return reward
     */
    @Override
    public List<OfferReward> selectOfferRewardList(OfferReward offerReward)
    {
        return offerRewardMapper.selectOfferRewardList(offerReward);
    }

    /**
     * 新增reward
     * 
     * @param offerReward reward
     * @return 结果
     */
    @Override
    public int insertOfferReward(OfferReward offerReward)
    {
        return offerRewardMapper.insertOfferReward(offerReward);
    }

    /**
     * 修改reward
     * 
     * @param offerReward reward
     * @return 结果
     */
    @Override
    public int updateOfferReward(OfferReward offerReward)
    {
        return offerRewardMapper.updateOfferReward(offerReward);
    }

    /**
     * 批量删除reward
     * 
     * @param rewardIds 需要删除的reward主键
     * @return 结果
     */
    @Override
    public int deleteOfferRewardByRewardIds(Long[] rewardIds)
    {
        return offerRewardMapper.deleteOfferRewardByRewardIds(rewardIds);
    }

    /**
     * 删除reward信息
     * 
     * @param rewardId reward主键
     * @return 结果
     */
    @Override
    public int deleteOfferRewardByRewardId(Long rewardId)
    {
        return offerRewardMapper.deleteOfferRewardByRewardId(rewardId);
    }
}
